package com.janko.springbootbase.designmode.prototypeClonePatten;

/**
 * @Author nyk
 * @Date 2021/4/30 9:16
 * @Version 1.0
 * @Desc
 */
public class Subject  implements  Cloneable {
    public Subject(String subjectName, int subjectId) {
        this.subjectName = subjectName;
        this.subjectId = subjectId;
    }

    String subjectName;
    int subjectId;

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public int getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(int subjectId) {
        this.subjectId = subjectId;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    public String toString() {
        return "Subject{" +
                "subjectName='" + subjectName + '\'' +
                ", subjectId=" + subjectId +
                '}';
    }
}
